import http from "../../utils/index";

/**
 * 分页查找角色
 * @param data
 * @returns {*}
 */
export function pager(data = {}) {
    return http.post("api/sys/role/pager", data);
}

/**
 * 查找详细
 * @param id
 * @returns {*}
 */
export function details(id) {
    return http.get("api/sys/role/details/"+id);
}

/**
 * 保存
 * @param data
 * @returns {*}
 */
export function save(data = {}) {
    return http.put("api/sys/role/save", data);
}

/**
 * 删除
 * @param ids
 * @returns {*}
 */
export function remove(ids) {
    return http.delete("api/sys/role/remove/"+ids);
}


/**
 * 查找所有的角色列表
 * @returns {*}
 */
export function listAll() {
    return http.get('api/sys/role/listAll');
}
